package com.example.mapper;

import com.example.entity.Activity;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ActivityMapper {
    int insert(Activity activity);

    int deleteById(Integer id);

    int updateById(Activity activity);

    Activity selectById(Integer id);

    List<Activity> selectAll(Activity activity);

    List<Activity> selectUser(Activity activity);


    @Update("update activity set read_count = read_count + 1 where id = #{activityId}")
    void updateReadCount(Integer activityId);

    List<Activity> selectLike(Activity activity);

    List<Activity> selectCollect(Activity activity);

    List<Activity> selectComment(Activity activity);
}
